package repository

import "gitee.com/anxu/golang-web/src/models"

var Post = new(post)

type post struct{}

func (p *post) Create(post *models.Post) *models.Post {
	res := models.Db.Create(post)
	if res.RowsAffected > 0 {
		return post
	}
	return nil
}
